package com.example.demo.core.repository;


import com.example.demo.core.entity.RoleMenu;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.transaction.annotation.Transactional;


public interface RoleMenuRepository extends JpaRepository<RoleMenu, Integer> {

    /**
     * @Description: 根据角色ID删除对应菜单
     * @param roleId 角色ID
     * @return: 无
     * @Author: wangze
     */
    @Transactional
    @Modifying
    void deleteAllByRoleId(Integer roleId);

}
